<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorator="manage/manage_layout_sub">

<head>
    <title>功能管理-修改</title>
</head>

<body class="manage manage-func">

<div layout:fragment="content">
    <div class="container">
        <form class="form-horizontal" onsubmit="return false;">
            <div class="form-group">
                <label for="funcId" class="col-sm-4 control-label">功能ID：</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control" id="funcId" name="funcId" th:value="*{funcInfo.funcId}"
                           Readonly>
                </div>
            </div>
            <div class="form-group">
                <label for="funcName" class="col-sm-4 control-label">功能名称：</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control" id="funcName" name="funcName"
                           th:value="*{funcInfo.funcName}">
                </div>
            </div>
            <div class="form-group">
                <label for="parentId" class="col-sm-4 control-label">父节点：</label>
                <div class="col-sm-4">
                    <select class="form-control" id="parentId" name="parentId">
                        <option th:each="func:${folders}" th:text="${func.funcName}" th:value="${func.funcId}" th:selected="${func.selected}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="funcUrl" class="col-sm-4 control-label">功能地址：</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control" id="funcUrl" name="funcUrl" th:value="*{funcInfo.funcUrl}">
                </div>
            </div>
            <div class="form-group">
                <label for="status" class="col-sm-4 control-label">状态：</label>
                <div class="col-sm-4">
                    <select id="status" name="status" class="form-control">
                        <option value="">请选择</option>
                        <option value="1" th:selected="(${funcInfo.status} == 1)">上线</option>
                        <option value="0" th:selected="(${funcInfo.status} == 0)">下线</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="visible" class="col-sm-4 control-label">是否页面可见：</label>
                <div class="col-sm-4">
                    <select class="form-control select2" id="visible" name="visible" th:value="*{funcInfo.visible}">
                        <option value="">请选择</option>
                        <option value="1" th:selected="(${funcInfo.visible} == 1)">可见</option>
                        <option value="0" th:selected="(${funcInfo.visible} == 0)">不可见</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="funcOrder" class="col-sm-4 control-label">排序编号 ：</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control" id="funcOrder" name="funcOrder"
                           th:value="*{funcInfo.funcOrder}">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-4 col-sm-4">
                    <button type="submit" class="btn btn-primary">保存</button>
                    <button type="reset" class="btn btn-default" id="resetBtn">重置</button>
                </div>
            </div>
        </form>
    </div>

    <script th:replace="common/common_libs::commonjs"></script>
    <script src="/js/manage/func.js"></script>
    <script>
        initFuncModifyPage();
    </script>
</div>

</body>
</html>